package com.ruoyi.APPMS.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.APPMS.mapper.PurchasevehicleMapper;
import com.ruoyi.APPMS.domain.Purchasevehicle;
import com.ruoyi.APPMS.service.IPurchasevehicleService;

import java.util.List;

/**
 * 购买车辆Service业务层处理
 *
 * @author wanghaoyu
 * @date 2023-07-03
 */
@Service
public class PurchasevehicleServiceImpl extends ServiceImpl<PurchasevehicleMapper, Purchasevehicle> implements IPurchasevehicleService {
    @Autowired
    private PurchasevehicleMapper purchasevehicleMapper;

    @Override
    public List<Purchasevehicle> list(Purchasevehicle purchasevehicle) {
        return purchasevehicleMapper.list(purchasevehicle);
    }

    @Override
    public Purchasevehicle listByid(Long vehicleid) {
        return purchasevehicleMapper.listByid(vehicleid);
    }

    @Override
    public boolean createOrder1(Purchasevehicle purchasevehicle) {
        return purchasevehicleMapper.createOrder1(purchasevehicle) > 0;
    }

    @Override
    public boolean createOrder2(Purchasevehicle purchasevehicle) {
        return purchasevehicleMapper.createOrder2(purchasevehicle) > 0;
    }
}
